{{extend 'layout.html'}}

{{if message != 'NoSession':}}
<div id="title"><span id="appname">Audit</span>Results</div>
<div id="results">
    {{i=0}}
    {{for result in results:}}
        {{i+=1}}
        {{if result.hasWarningIcon():}}
        <div id="warn"><table><tr >
            <td><img src=/static/images/warning.png height=35px/></td>
            <td><h2>Report #{{=i}}: {{=result.title}}</h2></td>
        </tr></table></div>
        {{else:}}
        <h2>Report #{{=i}}: {{=result.title}}</h2>
        {{pass}}
        <hr>
        {{
        for element in result:
            if element.__class__.__name__ == 'str':
                response.write(element + '<br/>', escape=False)
            elif element.__class__.__name__ == 'Table':
                response.write(element.getHTML(), escape=False)
            else:
                response.write(element.getImage())
            pass
        pass
        }}
    {{pass}}
</div>
{{else:}}
<center>
<h2>No Report Generated</h2>
</center>
<p>The report isn't generated until files have been uploaded from our <a href='/index'>Home</a> page.</p>
{{pass}}
